//
//  caiwurizhiTableViewCell.m
//  jypt_ios
//
//  Created by 千翼网络科技 on 2017/9/23.
//  Copyright © 2017年 xp. All rights reserved.
//

#import "caiwurizhiTableViewCell.h"

@implementation caiwurizhiTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if (self = [super initWithStyle:style reuseIdentifier:@"identifier"]) {
        
        [self initView];
    }
    return self;
}

#pragma mark ---------------- init -----------------

- (void)initView{
    
    self.backgroundColor = getColor(@"ffffff");
    
    _nameLabel = [[UILabel alloc]init];
    _nameLabel.text = @"标题";
    _nameLabel.textColor = getColor(@"333333");
    _nameLabel.textAlignment = NSTextAlignmentLeft;
    _nameLabel.font = get4sFont(12);
    [self addSubview:_nameLabel];
    [_nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.contentView).with.offset(screenScale(10));
        make.left.mas_equalTo(self).with.offset(screenScale(15));
        
        
    }];
    
    _contentLabel = [[UILabel alloc]init];
    _contentLabel.text = @"这里是内容";
    _contentLabel.textColor = getColor(@"474747");
    _contentLabel.textAlignment = NSTextAlignmentLeft;
    _contentLabel.font = get4sFont(11);
    [self addSubview:_contentLabel];
    [_contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(self.contentView).with.offset(screenScale(-10));
        make.left.mas_equalTo(self).with.offset(screenScale(15));
        
        
    }];
    
    _dateLabel = [[UILabel alloc]init];
    _dateLabel.text = @"2017.04.23";
    _dateLabel.textColor = getColor(@"474747");
    _dateLabel.textAlignment = NSTextAlignmentLeft;
    _dateLabel.font = get4sFont(11);
    [self addSubview:_dateLabel];
    [_dateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.contentView).with.offset(screenScale(10));
        make.right.mas_equalTo(self).with.offset(screenScale(-15));
        
        
    }];
    
    _numLabel = [[UILabel alloc]init];
    _numLabel.text = @"+25000";
    _numLabel.textColor = getColor(@"333333");
    _numLabel.textAlignment = NSTextAlignmentLeft;
    _numLabel.font = get4sFont(12);
    [self addSubview:_numLabel];
    [_numLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(self.contentView).with.offset(screenScale(-10));
        make.right.mas_equalTo(self).with.offset(screenScale(-15));
        
        
    }];
    
    _threadView = [[UIView alloc]init];
    _threadView.backgroundColor = getColor(@"e6e6e6");
    [self addSubview:_threadView];
    [_threadView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(self).with.offset(0);
        make.left.mas_equalTo(self).with.offset(0);
        make.width.mas_equalTo(scrWidth());
        make.height.mas_equalTo(screenScale(1));
    }];
}

@end
